import { defineStore } from 'pinia'

const piniaStore: any = defineStore('main',{
  state: () => {
    return {
      // 左侧菜单数据
      routerUrlList: [],
      // 面包屑导航
      crumbsStr: "分析页",
    }
  },
  // 计算属性
  getters: {},
  // 异步操作
  actions: {
    // 左侧菜单修改
    setMenu(data: []) {
      this.routerUrlList = data;
    },
    // 面包屑修改
    setCrumbs(data: string) {
      this.crumbsStr = data;
    },
  }
})

export default piniaStore;